<template>
	<view class="system">
		<view class="message_top">
			<view class="message_top_title" :style="{top:computedTop}">系统消息</view>
			<view class="message_top_back" :style="{top:computedTop}" @click="Back">
				<image src="../../static/search/back.png" class="bfbimages"></image>
			</view>
		</view>

		<view class="system_tab">
			<u-tabs :list="list1" @click="click" :activeStyle="{
            color: '#303133',
            fontWeight: 'bold',
            transform: 'scale(1.05)'
        }" :inactiveStyle="{
            color: '#999999',
            transform: 'scale(1)'
        }" itemStyle="padding-left: 15px; padding-right: 15px; height: 40px;width:40px;" lineColor='#FF3833'></u-tabs>
		</view>

		<view class="system_list" @click="LinkMessage">
			<view class="system_list_one">
				<view>
					<view class="system_list_one_icon"></view>
					<text>系统消息</text>
				</view>
				<view>2024/05/12 15:30</view>
			</view>

			<view class="system_list_two">
				<view></view>
				<text>关于系统升级的通知</text>
			</view>

			<view class="system_list_therr ellipsis2">为了让您更好的使用资源平台,我们正在对平台进行升级升级期间暂时无法访问。给您带来的不便,敬请谅解</view>

			<view class="system_list_four">
				<text>查看详情</text>
				<view class="flex">
					<image src="../../static/right.png" class="bfbimages"></image>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				menuButtonInfo: null,
				list1: [{
					name: '全部',
				}, {
					name: '未读',
				}]
			}
		},
		computed: {
			computedTop() {
				if (this.menuButtonInfo) {
					return `${this.menuButtonInfo.height * 2 - 6}px`;
				}
				return '0px';
			},
		},
		onLoad() {
			const info = uni.getMenuButtonBoundingClientRect();
			this.menuButtonInfo = info;
		},
		methods: {
			LinkMessage() {
				uni.navigateTo({
					url: '/pages/system/systemXQ'
				})
			},
			click(item) {
				console.log('item', item);
			},
			Back() {
				uni.navigateBack()
			}
		}
	}
</script>

<style lang="scss">
	.system {
		width: 100vw;
		min-height: 100vh;
		float: left;

		.message_top {
			width: 100%;
			height: 200rpx;
			position: relative;

			.message_top_title {
				width: 100%;
				text-align: center;
				font-family: PingFang SC, PingFang SC;
				font-weight: bold;
				font-size: 36rpx;
				color: #333333;
				position: absolute;
				left: 0;
				z-index: 2;
			}

			.message_top_back {
				width: 44rpx;
				height: 44rpx;
				position: absolute;
				left: 30rpx;
				z-index: 9;
			}
		}

		.system_tab {
			width: 100%;
			height: 80rpx;
			display: flex;
			align-items: center;
			margin: 0 auto 0;
		}

		.system_list {
			width: 690rpx;
			background: #FFFFFF;
			box-shadow: 0rpx 3rpx 25rpx 0rpx rgba(88, 64, 64, 0.09);
			border-radius: 20rpx;
			margin: 20rpx auto 0;

			.system_list_one {
				width: 630rpx;
				height: 92rpx;
				border-bottom: 2rpx solid #ECECEC;
				display: flex;
				align-items: center;
				justify-content: space-between;
				margin: 0 auto;
				font-family: PingFang SC, PingFang SC;
				font-weight: 500;
				font-size: 26rpx;
				color: #333333;
			}

			.system_list_one>view:nth-child(1) {
				width: 60%;
				height: 100%;
				display: flex;
				align-items: center;
			}

			.system_list_one_icon {
				width: 32rpx;
				height: 32rpx;
				background-color: green;
				margin-right: 15rpx;
			}

			.system_list_one>view:nth-child(2) {
				font-family: PingFang SC, PingFang SC;
				font-weight: 500;
				font-size: 26rpx;
				color: #999999;
			}

			.system_list_two {
				width: 630rpx;
				height: 32rpx;
				display: flex;
				align-items: center;
				margin: 30rpx auto 0;
				font-family: PingFang SC, PingFang SC;
				font-weight: bold;
				font-size: 32rpx;
				color: #333333;
			}

			.system_list_two>view:nth-child(1) {
				width: 8rpx;
				height: 8rpx;
				background: #FF3833;
				border-radius: 50%;
				margin-right: 20rpx;
			}

			.system_list_therr {
				width: 630rpx;
				height: 78rpx;
				margin: 10rpx auto 0;
				font-family: PingFang SC, PingFang SC;
				font-weight: 500;
				font-size: 26rpx;
				color: #888888;
			}

			.system_list_four {
				width: 630rpx;
				height: 90rpx;
				display: flex;
				align-items: center;
				justify-content: space-between;
				margin: 10rpx auto 0;
				font-family: PingFang SC, PingFang SC;
				font-weight: 500;
				font-size: 26rpx;
				color: #F95518;
				border-top: 2rpx solid #ECECEC;
			}

			.system_list_four>view {
				width: 20rpx;
				height: 23rpx;
			}
		}
	}
</style>